<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();

$adname = $_SESSION["username"];
$client_ip = getClientIP();
$timestamp = time();
if (isset($_GET["uid"])) {
    $uid = $_GET["uid"];
    // 执行删除操作
    echo $uid;
    $database->delete("text_auth", ["tid" => $uid]); //清理文章权限
    $database->delete("text_main", ["tid" => $uid]); //清理文章
    $database->delete("more_file", ["text_id" => $uid]); //清理文件关联信息
    echo "<script>alert('删除成功!');location.href='/admin/metext.php';</script>";
}
